class Dog{ // 
    constructor(name,breed){
        this.name=name;
        this.breed=breed;
    }
    bark(){
        console.log(`bark bark my name is${this.name}`)
    }
    cuddle(){
        console.log('i love you owner!');
    }
    static info(){
        console.log('A dog is better thsa a cat by 10 times');
    }
    get description(){
        return `${this.name} is a ${this.breed} type of dog`;
    }
    set nicknames(value){
        this.nick=value.trim()
    }
    get nicknames(){
        console.log('--set')
        return this.nick.toUpperCase();
    }
}
const snickers = new Dog('Snickers','king charles');
// console.log(Dog.info());
console.log(snickers.description);
snickers.nicknames='赌圣';
console.log(snickers.nicknames);

